<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.10/vue.js"></script>
</head>
<body>
<div id="app">
<!--
    当复选框使用多个时
    我们应该用数组收集用户选择的内容,收集的是当前input的value的值
  -->
    <h2>请选择你喜欢的食物</h2>
    <input type="checkbox" value="篮球" v-model="likeBall"/>篮球
    <input type="checkbox" value="足球" v-model="likeBall"/>足球
    <input type="checkbox" value="羽毛球" v-model="likeBall"/>羽毛球
</div>
<script>
    const vm = new Vue({
        el:"#app",
        data(){
            return{
                likeBall:[],
            };
        },
    });
</script>
</body>
</html>